﻿
-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	补助记录，创建
-- =============================================
CREATE PROCEDURE [dbo].[proc_Employee_Subsidy_Create] 
	(
	@Eid int,
	@EName nvarchar(50),
	@Companyid int,
	@Departmentid int ,
	@ApplionMoney decimal(18, 2),
	@ApplionMonth varchar(50),
	@Reason nvarchar(max),
	@Proposer varchar(50),
	@ProposerName nvarchar(50)	,
	@UserName varchar(50)
	)
AS
BEGIN
		
declare @CompanyName NVARCHAR(200),@DepartmentName nvarchar(200)		
		select @CompanyName=companyname from company where id=@Companyid
		select @DepartmentName=dname from department where id=@Departmentid
				
 INSERT INTO [Employee_Subsidy]
           ([Eid]
           ,[EName]
           ,[Companyid]
           ,[Departmentid]
           ,[ApplionMoney]
           ,[ApplionMonth]
           ,[Reason]
           ,[Proposer]
           ,[ProposerName]
           ,UserName
            ,Companyname
           ,departmentname
         )
     VALUES
           (@Eid,
            @EName
           ,@Companyid
           ,@Departmentid
           ,@ApplionMoney
           ,@ApplionMonth
           ,@Reason       
           ,@Proposer
           ,@ProposerName
           ,@UserName
           ,@CompanyName
           ,@DepartmentName
           )
           
           
           
END

